﻿using System; 

module NTimesExtentions 
{
  public NemerleTimes(this n : int, action : void -> void) : void
  {
    for (mutable i = 0; i < n; i++) action();
  }
}

class NTimes
{
  public this() {}  
  
  public UseTimes() : void
  {
    5.NemerleTimes(() => Console.WriteLine("Foo!"));
  }
}